package com.cnebula.common.hdfs.http.unittest;

import java.io.IOException;
import java.net.MalformedURLException;

import org.apache.hadoop.security.authentication.client.AuthenticationException;
import org.junit.Before;
import org.junit.Test;
import junit.framework.Assert;

import com.cnebula.common.hdfs.http.impl.WebHDFSConnectionImpl;

public class TestWebHDFSConnetction {
	WebHDFSConnectionImpl webHDFSConnectionImpl;

	@Before
	public void before() {
		webHDFSConnectionImpl = new WebHDFSConnectionImpl();
	}

	@Test
	public void testOkStatus() throws AuthenticationException {
		String homeDirectory = null;
		try {
			homeDirectory = webHDFSConnectionImpl.getHomeDirectory();
			Assert.assertEquals(homeDirectory , webHDFSConnectionImpl.getHomeDirectory());
		} catch (MalformedURLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
	}
}